<% provide(:title, '用户列表') %>
<% if current_user.admin? %>
<div class="concard noflex nobgc">
<div class="form">
<div class="fti">用户列表</div>
<%= will_paginate %>
<% @users.each do |user| %>
<table>
  <tr>
    <td><%= user.name %></td>
    <td><% if current_user.admin? && !current_user?(user) %>
<%= link_to "delete", user, method: :delete,data: { confirm: "确认删除此用户吗？" } %>
<% end %></td>
  </tr>
  </table>
<% end %>
<%= will_paginate %>
</div>
</div>
<% else %>
<div class="concard noflex nobgc">
<div class="form">权限不足</div>
</div>
<% end %>